import request from '@/plugins/request/system'
import request2 from '@/plugins/request/system/index2'
import { param } from 'jquery'

/**
 * 获取列表
 * @param {Object} data
 */
export function SystemMerchantsList (data) {
  return request({
    url: '/systemv1/merchants/list',
    method: 'post',
    data: data
  })
}
/**
 * 获取列表
 * @param {Object} data
 */
export function SystemMerchantscolsedList (data) {
  return request({
    url: '/systemv1/merchants/listcolsed',
    method: 'post',
    data: data
  })
}
/**
 * 获取列表
 * @param {Object} data
 */
export function SystemMerchantsclosedItem (data) {
  return request({
    url: '/systemv1/merchants/itemclosed',
    method: 'post',
    data: data
  })
}

/**
 * 获取列表
 * @param {Object} data
 */
export function SystemMerchantsListAll (data) {
  return request({
    url: '/systemv1/merchants/listAll',
    method: 'post',
    data: data
  })
}

/**
 * 获取列表
 * @param {Object} data
 */
export function SystemMerchantsCqList (data) {
  return request({
    url: '/systemv1/merchants/cqList',
    method: 'post',
    data: data
  })
}

/**
 * 获取列表
 * @param {Object} data
 */
export function SystemMerchantsCqListAll (data) {
  return request({
    url: '/systemv1/merchants/cqListAll',
    method: 'post',
    data: data
  })
}

/**
 * 获取列表
 * @param {Object} data
 */
export function SystemMerchantsAll (data) {
  return request({
    url: '/systemv1/merchants/all',
    method: 'post',
    data: data
  })
}

/**
 * 申请删除商户
 * @param {Object} data
 */
export function SystemMerchantsSqDel (data) {
  return request({
    url: '/systemv1/merchants/delfirm',
    method: 'post',
    data: data
  })
}

/**
 * 删除商户
 * @param {Object} data
 */
export function SystemMerchantsDel (data) {
  return request({
    url: '/systemv1/merchants/del',
    method: 'post',
    data: data
  })
}
/**
 * 获取商户
 * @param {Object} data
 */
export function SystemMerchantsItem (data) {
  return request({
    url: '/systemv1/merchants/item',
    method: 'post',
    data: data
  })
}
/**
 * 保存商户
 * @param {Object} data
 */
export function SystemMerchantsSave (data) {
  return request({
    url: '/systemv1/merchants/save',
    method: 'post',
    data: data
  })
}

/**
 * 保存商户
 * @param {Object} data
 */
export function SystemMerchantsUserSave (data) {
  return request({
    url: '/systemv1/merchants/userSave',
    method: 'post',
    data: data
  })
}

/**
 * 商户列表
 * @param {Object} data
 */
export function SystemMerchantsUserList (data) {
  return request({
    url: '/systemv1/merchants/userList',
    method: 'post',
    data: data
  })
}

/**
 * 商户会员移除
 * @param {Object} data
 */
export function SystemMerchantsUserDel (data) {
  return request({
    url: '/systemv1/merchants/userDel',
    method: 'post',
    data: data
  })
}

/**
 * 商户列表
 * @param {Object} data
 */
export function SystemMerchantsShInit (data) {
  return request({
    url: '/systemv1/merchants/shInit',
    method: 'post',
    data: data
  })
}

/**
 * 商户列表
 * @param {Object} data
 */
export function SystemMerchantsShList (data) {
  return request({
    url: '/systemv1/merchants/shList',
    method: 'post',
    data: data
  })
}
/**
 * 商户列表
 * @param {Object} data
 */
export function SystemtsxxList (data) {
  return request({
    url: '/systemv1/merchants/tsxx',
    method: 'post',
    data: data
  })
}
/**
 * 每日统计商户列表
 * @param {Object} data
 */
export function SystemshsjtjList (data) {
  return request({
    url: '/systemv1/merchants/shsltj',
    method: 'post',
    data: data
  })
}
/**
 * 每日统计商户列表
 * @param {Object} data
 */
export function SystemOutXls (data) {
  return request({
    url: '/systemv1/merchants/outXls',
    method: 'post',
    data: data
  })
}

/**
 * 超期商户列表
 * @param {Object} data
 */
export function SystemlscqList (data) {
  return request({
    url: '/systemv1/project/lscq',
    method: 'post',
    data: data
  })
}

/**
 * 商户列表
 * @param {Object} data
 */
export function SystemMerchantsShDelList (data) {
  return request({
    url: '/systemv1/merchants/delshList',
    method: 'post',
    data: data
  })
}

/**
 * 商户修改日志列表
 * @param {Object} data
 */
export function SystemMerchantsupdLogList (data) {
  return request({
    url: '/systemv1/merchants/merupdlogList',
    method: 'post',
    data: data
  })
}

/**
 * 商户列表
 * @param {Object} data
 */
export function SystemMerchantsShDel (data) {
  return request({
    url: '/systemv1/merchants/shDel',
    method: 'post',
    data: data
  })
}
/**
 * 商户列表
 * @param {Object} data
 */
export function SystemMerchantsShDelsq (data) {
  return request({
    url: '/systemv1/merchants/shDelsq',
    method: 'post',
    data: data
  })
}

/**
 * 商户列表
 * @param {Object} data
 */
export function SystemMerchantsDelfirsur (data) {
  return request({
    url: '/systemv1/merchants/delfirmsur',
    method: 'post',
    data: data
  })
}

/**
 * 审核提交
 * @param {Object} data
 */
export function SystemMerchantsShSub (data) {
  return request({
    url: '/systemv1/merchants/shSub',
    method: 'post',
    data: data
  })
}

/**
 * 商户列表
 * @param {Object} data
 */
export function SystemMerchantsCqSqInit (data) {
  return request({
    url: '/systemv1/merchants/cqSqInit',
    method: 'post',
    data: data
  })
}

/**
 * 商户列表
 * @param {Object} data
 */
export function SystemMerchantsCqSqList (data) {
  return request({
    url: '/systemv1/merchants/cqSqList',
    method: 'post',
    data: data
  })
}

/**
 * 审核提交
 * @param {Object} data
 */
export function SystemMerchantsCqShSub (data) {
  return request({
    url: '/systemv1/merchants/cqShSub',
    method: 'post',
    data: data
  })
}

/**
 * 审核提交
 * @param {Object} data
 */
export function SystemMerchantsCqShDel (data) {
  return request({
    url: '/systemv1/merchants/cqShDel',
    method: 'post',
    data: data
  })
}

export function getLongitudeLatitude (param) {
  return request2({
    url: `/apiv2/cateringCompany/getLongitudeLatitude?address=${param.address}`,
    method: 'GET'
    // param,
    // headers: {
    //   'Content-Type': 'application/json'
    // },
  })
}

export function listAll (data) {
  return request2({
    url: '/apiv2/cateringCompany/listAll',
    method: 'post',
    data: data
  })
}

export function addEquipment (data) {
  return request2({
    url: '/apiv2/equipmentInfo/addEquipment',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

export function dapingLogin (data) {
  return request2({
    url: '/apiv2/user/login',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json'
    }
  })
}